#ifndef _FIG_ENEMY_DRAGON_H_
#define _FIG_ENEMY_DRAGON_H_


#include "fig_enemy_pathcraft.h"

#include "ui/ui_manager.h"

class FIGEnemyDragon : public FIGEnemyPathCraft 
{
public:

	const static int	 PIECE_MAX_COUNT = 40;

	struct							DragonPiece
	{
		DragonPiece();

		void						Tick(	float dt,
											float MoveSpeed,
											FIGFlyingPath::PATH_TYPE PType
											);
		void						Render(	const math::Vec2& Offset,
											float Scale,
											ui::UISprite& SpriteToRender											
											);

		

		math::Vec2					m_Pos;
		float						m_Rotation;
		FIGFlyingPath::CraftInfo	m_PathCraftInfo;
		float						m_Delay;
		float						m_ScaleX;

	};
	

	FIGEnemyDragon(FIGEnemyCraft::ENEMY_TYPES EnemyType);
	

	
	virtual void					Tick(float dt);
	virtual void					Render(const math::Vec2& Offset,float Scale);
	virtual void					ReSpawn();
	virtual bool					HitTest(FIGBullet* pBullet);
	virtual bool					HitTest(const math::Vec2& Point);
	virtual bool					HitTest(FIGLifeObj* pCraft);
		

protected:

	virtual	void					OnShoot();
	virtual void					OnStartDying();
	virtual void					OnExplode();


	
	DragonPiece						m_Pieces[PIECE_MAX_COUNT];
	ui::UISprite					m_SpriteHead;
	ui::UISprite					m_SpriteBodyPiece;
	ui::UISprite					m_SpriteTail;

		
			
};

#endif
